<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加编辑图片-网站设置-{$site.SITE_INFO.name}</title>
    <php>
        $addCss="";
        $addJs="";
        $currentNav ='网站设置 > 添加编辑图片';
    </php>
    <include file="Common:intoHead" />
</head>
<body>
<div class="wrap"> <include file="Common:head" />
    <div class="mainBody"> <include file="Common:left" />
        <div id="Right">
            <div class="contentArea">
                <div class="Item hr">
                    <div class="current">添加编辑图片</div>
                </div>
                <form action="{:U('Siteinfo/add_ad')}" method="post" enctype="multipart/form-data">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
                        <php>if($site['SITE_INFO']['LANG_SWITCH_ON']=='1'){</php>
                        <tr>
                            <th>语言选择：</th>
                            <td><select name="info[lang]" style="width: 80px;">
                                <option value="zh-cn" <if condition="$info['lang'] eq 'zh-cn'">selected</if>>简体中文</option>
                                <option value="en-us" <if condition="$info['lang'] eq 'en-us'">selected</if>>English</option>
                            </select></td>
                        </tr>
                        <php>}</php>
                        <tr>
                            <th width="120">广告名称：</th>
                            <td><input name="info[ad_name]" type="text" class="input" size="40" value="{$info.ad_name}" /> </td>
                        </tr>
                        <tr>
                            <th>投放位置：</th>
                            <td><select name="info[position]" style="width: 140px;">
                                <option value="all" <if condition="$info['position'] eq 'all'">selected</if>>全局-除首页</option>
                                <option value="index" <if condition="$info['position'] eq 'index'">selected</if>>首页</option>

                                <option value="wap" <if condition="$info['position'] eq 'wap'">selected</if>>手机310*190</option>

                                <option value="news" <if condition="$info['position'] eq 'news'">selected</if>>新闻页</option>
                                <option value="product" <if condition="$info['position'] eq 'product'">selected</if>>产品页</option>
                                <option value="message" <if condition="$info['position'] eq 'message'">selected</if>>留言板页</option>
                                <volist name="pagelist" id="vo">
                                    <option value="{$vo.unique_id}" <if condition="$info['position'] eq $vo['unique_id']">selected</if>>{$vo.fullname}</option>
                                </volist>
                            </select></td>
                        </tr>
                        <tr id="hidetr">
                            <th width="120">上传图片：</th>
                            <td><input type="file" class="input" size="60" name="ad_img" value=""/>
                            </td>
                        </tr>
                        <tr>
                            <th>链接地址：</th>
                            <td><input class="input" name="info[ad_link]" type="text" size="50" value="{$info.ad_link}" /> 请加上http://</td>
                        </tr>
                        <tr>
                            <th>显示排序：</th>
                            <td><input class="input" name="info[sort]" type="text" size="20" value="{$info.sort}" /> </td>
                        </tr>
                        <php>if($info['ad_img']){</php>
                        <tr>
                            <th>图片显示：</th>
                            <td><a href="__UPLOAD__/picture/{$info.ad_img}" target="_blank"><img src="__UPLOAD__/picture/{$info.ad_img}" border="0" height="40" width="200"></a></td>
                        </tr>
                        <php>}</php>

                    </table>
                    <input type="hidden" name="id" value="{$info.id}"/>
                </form>
                <div class="commonBtnArea" >
                    <button class="btn submit">提交</button>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="clear"></div>
<include file="Common:foot" />
<script type="text/javascript">
    $(function(){
        $(".submit").click(function(){
            commonAjaxSubmit();
        });
    });
</script>
</body>
</html>